<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<!-- Load script to check cookies -->
<script type="text/javascript" src="scripts/_cookie.js"></script>


<script type="text/javascript">
<!--
// set a session cookie which will expire when the browser is closed
setCookie('hasVisited', 'Yes');

//set a session cookie which will expire when the browser is closed
//setCookie('fronterUser', '678-523-7250', 0, '/');

// get the value of a cookie already set
cookieValue = getCookie('hasVisited');

alert(cookieValue) //Yes

// set a cookie which will expire in 1 day
setCookie('hasVisitedToday', 'Yes', 3);

// set a cookie which will expire in 3 days and be accessible site wide
setCookie('hasVisitedSite', 'Yes', 3, '/');

//set a cookie which will expire in 0 days and be accessible site wide
//setCookie('fronterUser', 'Yes', 0, '/');

// set a cookie which will expire in 3 days and be accessible only while 
// in the 'members' folder
setCookie('cookieName', 'cookieValue', 3, '/members');

// set a cookie which will expire in 3 days and be accessible only while 
// in the 'members' folder, and will be transmitted securely
setCookie('cookieName', 'cookieValue', 3, '/members', '', 1);

// set a cookie which will expire in 3 days and be accessible site wide
// and set the domain name
setCookie('cookieName', 'cookieValue', 3, '/', 'perlscriptsjavascript.com');

// print all cookies set for the domain
allCookies = printCookies();
document.write(allCookies);
alert(allCookies);

// delete a specific cookie by setting it's expiration date to the past
// and defining a blank value
setCookie('cookieName', '', -1);

// see notes on deleting cookies below if your cookies are not being deleted
// -->
</script>
</head>
<body>
an error has occurred!!!
</body>
</html>